// index.js
const app = getApp()
import {
  timestampToTime
} from "../../utils/util.js"
Component({
  data: {
    appurl: app.apiurl,
    apiimg: app.apiimg,
    gglist: '',
    gglist1: '',
    gglist2: '',
    jplist: '',
    page_no: 1,
    statusHeight: '',
    autoplay: true,
    interval: 2000,
    duration: 500,
    login: false,
    list1: [
      'SKll精华', 'SKll精华', 'SKll精华'
    ],
    list2: [
      'SKll精华', 'SKll精华', 'SKll精华'
    ],
    list3: [],
    list5: [],
    luodi: false,
    tanchuang14: false,
    tanchuang24: false,
    idxttc: false,
    idxttc1: false,
    yindao: false,
    yindaonum: false,
    kh_info: false,
    tj_activity: false,
    bm_status: '0',
    baoming77: false,
    member_name: '',
    member_id: '',
    tanchuang3: false,
    yonghu: [],
    khgjs_pm_index: '0',
    saixuan: false,
    saixuan1: false,
    is_sp: '0',
    sxlist1: ['不限', '游戏等级高', '被拉黑次数少', '好评高', '获冠军多'],
    order_type: 0,
    sxlist2: ['不限', '男', '女'],
    sx_sex: 0,
    sxlist3: ['不限', '微信区', 'QQ区'],
    sx_area: 0,
    sxlist4: [{
        id: "0",
        title: "不限",
        xz_flag: false
      }, {
        id: "1",
        title: "对抗路",
        xz_flag: false
      },
      {
        id: "2",
        title: "中路",
        xz_flag: false
      },
      {
        id: "3",
        title: "发育路",
        xz_flag: false
      },
      {
        id: "4",
        title: "打野",
        xz_flag: false
      },
      {
        id: "5",
        title: "辅助",
        xz_flag: false
      }
    ],
    sxlist6: ['不限','收花开黑', '收花带飞', '收花陪聊', '免费开黑', '王者处CP','免费交友','寻找战队','战队招人','其他'],
    order_type1: 0,
    sx_fenlu: [],
    sx_fenlu1: false,
    sxlist5: [],
    sx_yxdj: [],
    sx_yxdj1: false,
    sx_zx: 0,
    sx_gj: 0,
    sx_tc: 0,
    sx_sc: 0,
    supei: false,
    xinrenyindao1: false,
    xinrenyindao2: false,
    xinrenyindao3: false,
    xinrenyindao4: false,
    xinrenyindao5: false,
    xinrenyindao6: false,
    xinrenyindao7: false,
    xinrenyindao8: false,
    xinrenyindao9: false,
    xinrenyindao10: false,
    xinrenyindao11: false,
    xinrenyindao12: false,
    xinrenyindao13: false,
    kftanchuang: false,
    wanshanziliao: false,
    wanshanziliao1: false,
    yindaojiesu: false,
    is_clear: 0,
    xydb_pm_status: '0',
    bm_wztzs_status: '0',
    xydb_pm: '',
    sx_tply:'0',
    weidenglu:false,
    day_sign_status:'0'
  },
  methods: {
    // 事件处理函数
    onLoad(query) {
      if (wx.getStorageSync("user_token") == "") {
        this.setData({
          weidenglu:true
        })
        wx.request({
          url: app.apiurl + 'api/home/xcxLoginStatus',
          method: 'GET',
          data: {},
          header: {
            'content-type': 'application/x-www-form-urlencoded' // 修改请求
          },
          success(res) {
            if (res.data.code == '1001') {
              if (res.data.data.is_force_login == '1') {
                // wx.reLaunch({
                //   url: '/pages/login/login'
                // });
              }
            }
          }
        })
      }
      if (wx.getStorageSync("wanshanziliao1") == "1") {
        this.setData({
          wanshanziliao1: true
        })
      }
      let that = this
      const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
      const scancode_time = parseInt(query.scancode_time) // 获取用户扫码时间 UNIX 时间戳
      if (query.q) {
        const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
        let obj = that.getUrlParam(q);
        if (obj.refereeid != '' && obj.refereeid != 'undefined') {
          wx.setStorageSync("refereeid", obj.refereeid)
        } else {
          wx.setStorageSync("refereeid", 0)
        }
      } else {
        wx.setStorageSync("refereeid", 0)
      }
    },
    z_dengluyanzeng(){
      wx.request({
        url: app.apiurl + 'api/home/xcxLoginStatus',
        method: 'GET',
        data: {},
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          if (res.data.code == '1001') {
            if (res.data.data.is_force_login == '1') {
              // wx.reLaunch({
              //   url: '/pages/login/login'
              // });
              wx.showToast({
                title: '请注册/登录会员账号',
                icon: 'none',
                duration: 2000
              })
              setTimeout(function(){
                wx.reLaunch({
                  url: '/pages/member/member',
                })
              },2500)
            }
          }
        }
      })
    },
    z_meizhuye() {
      wx.showToast({
        title: '该会员没有发布主页',
        icon: 'none',
        duration: 2000
      })
    },
    getUrlParam(url) {
      let params = url.split("?")[1].split("&");
      let obj = {};
      params.map(v => (obj[v.split("=")[0]] = v.split("=")[1]));
      return obj
    },
    upload() {
      let that = this
      wx.chooseMedia({
        count: 1,
        mediaType: ['image'],
        sourceType: ['album', 'camera'],
        maxDuration: 30,
        camera: 'back',
        success(e) {
          var tempFiles = e.tempFiles[0]['tempFilePath'];
          // console.log('1111111',e)
          // console.log('2222222',tempFiles)
          wx.uploadFile({
            url: app.apiurl + 'api/common/upload',
            filePath: tempFiles,
            name: 'file',
            formData: {},
            success(res) {
              console.log('成功：', res)
            },
            fail(aaa) {
              console.log('失败：', aaa)
              console.log('33333', tempFiles)
            }
          })
        }
      })
    },
    // upload(e) {
    //   let that = this
    //   var tempFiles = e.detail.avatarUrl;
    //       console.log('1111111',e)
    //       console.log('2222222',tempFiles)
    //   wx.uploadFile({
    //     url: app.apiurl + 'api/common/upload',
    //     filePath: tempFiles,
    //     name: 'file',
    //     formData: {},
    //     success(res) {
    //       console.log('成功：',res)
    //     },
    //     fail(aaa){
    //       console.log('失败：',aaa)
    //     }
    //   })
    // },
    fuzhi1(e) {
      let _this = this
      wx.setClipboardData({
        data: e.dataset.member_name,
        success(res) {
          wx.getClipboardData({
            success(res) {
              console.log(res.data) // data
              wx.showToast({
                title: '复制成功',
                icon: 'success',
                duration: 2000
              })
            }
          })
        }
      })
    },
    fuzhi2() {
      let _this = this
      wx.setClipboardData({
        data: _this.data.bisai.solo_info.member_info2.member_name,
        success(res) {
          wx.getClipboardData({
            success(res) {
              console.log(res.data) // data
              wx.showToast({
                title: '复制成功',
                icon: 'success',
                duration: 2000
              })
            }
          })
        }
      })
    },
    z_open() {
      this.setData({
        saixuan1: true
      })
    },
    z_open1() {
      this.setData({
        kftanchuang: true
      })
    },
    z_open2() {
      this.setData({
        wanshanziliao: true
      })
    },
    z_close() {
      this.setData({
        tanchuang3: false,
        saixuan1: false,
        kftanchuang: false
      })
    },
    z_nav1() {
      wx.navigateTo({
        url: '/pages/shezi/shezi',
      })
    },
    z_close1() {
      this.setData({
        wanshanziliao: false
      })
    },
    z_close2() {
      wx.navigateTo({
        url: '/pages/choujiang1/choujiang1',
      })
      wx.setStorageSync("xinrenyindao", '7')
    },
    z_close3() {
      this.setData({
        wanshanziliao1: false
      })
      wx.setStorageSync("wanshanziliao1", '')
    },
    z_tiaozhuan(e) {
      if (this.data.yonghu.game_dw_name != '') {
        if (e.currentTarget.dataset.id == this.data.yonghu.id) {
          wx.showToast({
            title: '不能与自己对话',
            icon: 'none',
            duration: 2000
          })
        } else {
          wx.navigateTo({
            url: '/packageA/pages/liao/liao?id=' + e.currentTarget.dataset.id + '&sid=999',
          })
        }
      } else {
        this.setData({
          wanshanziliao: true
        })
      }
    },
    z_tiaozhuan1(){
      wx.showToast({
        title: '不能与自己对话',
        icon: 'none',
        duration: 2000
      })
    },
    z_shaixuan1(e) {
      let _this = this
      let index;
      if(e.currentTarget.dataset.index != _this.data.order_type){
        index = e.currentTarget.dataset.index
      } else {
        index = 0
      }
      _this.setData({
        order_type: index
      })
    },
    z_shaixuan7(e) {
      let _this = this
      let index;
      if(e.currentTarget.dataset.index != _this.data.order_type1){
        index = e.currentTarget.dataset.index
      } else {
        index = 0
      }
      _this.setData({
        order_type1: index
      })
    },
    z_shaixuan2(e) {
      let _this = this
      let index;
      if(e.currentTarget.dataset.index != _this.data.sx_sex){
        index = e.currentTarget.dataset.index
      } else {
        index = 0
      }
      _this.setData({
        sx_sex: index
      })
    },
    z_shaixuan3(e) {
      let _this = this
      let index;
      if(e.currentTarget.dataset.index != _this.data.sx_area){
        index = e.currentTarget.dataset.index
      } else {
        index = 0
      }
      _this.setData({
        sx_area: index
      })
    },
    z_shaixuan4: function (e) {
      let _this = this
      let index = e.currentTarget.dataset.index
      let xz_flag = e.currentTarget.dataset.xz_flag
      let id = e.currentTarget.dataset.id
      let sx_fenlu = _this.data.sx_fenlu
      if (xz_flag) {
        _this.setData({
          [`sxlist4[${index}].xz_flag`]: false,
        })
        for (let i = 0; i < sx_fenlu.length; i++) {
          if (sx_fenlu[i] == id) {
            sx_fenlu.splice(i, 1);
          }
        }
      } else {
        _this.setData({
          [`sxlist4[${index}].xz_flag`]: true
        })
        if (id != 0) {
          _this.setData({
            [`sxlist4[0].xz_flag`]: false
          })
          sx_fenlu.push(id)
          sx_fenlu = sx_fenlu.map(Number);
          _this.setData({
            sx_fenlu: sx_fenlu,
            sx_fenlu1: true
          })
        } else {
          let sxlist4 = _this.data.sxlist4
          for (let j = 0; j < sxlist4.length; j++) {
            sxlist4[j].xz_flag = false
          }
          _this.setData({
            sxlist4: sxlist4,
            [`sxlist4[0].xz_flag`]: true,
            sx_fenlu: [],
            sx_fenlu1: false
          })
        }
      }
    },
    z_shaixuan5: function (e) {
      let _this = this
      let index = e.currentTarget.dataset.index
      let xz_flag = e.currentTarget.dataset.xz_flag
      let id = e.currentTarget.dataset.id
      let sx_yxdj = _this.data.sx_yxdj
      if (xz_flag) {
        _this.setData({
          [`sxlist5[${index}].xz_flag`]: false,
        })
        for (let i = 0; i < sx_yxdj.length; i++) {
          if (sx_yxdj[i] == id) {
            sx_yxdj.splice(i, 1);
          }
        }
      } else {
        _this.setData({
          [`sxlist5[${index}].xz_flag`]: true
        })
        if (id != 0) {
          _this.setData({
            [`sxlist5[0].xz_flag`]: false
          })
          sx_yxdj.push(id)
          sx_yxdj = sx_yxdj.map(Number);
          _this.setData({
            sx_yxdj: sx_yxdj,
            sx_yxdj1: true
          })
        } else {
          let sxlist5 = _this.data.sxlist5
          for (let j = 0; j < sxlist5.length; j++) {
            sxlist5[j].xz_flag = false
          }
          _this.setData({
            sxlist5: sxlist5,
            [`sxlist5[0].xz_flag`]: true,
            sx_yxdj: [],
            sx_yxdj1: false
          })
        }
      }
    },
    z_shaixuan6_1() {
      let _this = this;
      let sx_zx = _this.data.sx_zx;
      if (sx_zx == 0) {
        sx_zx = 1;
      } else {
        sx_zx = 0;
      }
      _this.setData({
        sx_zx: sx_zx
      })
    },
    z_shaixuan6_2() {
      let _this = this;
      let sx_gj = _this.data.sx_gj;
      if (sx_gj == 0) {
        sx_gj = 1;
      } else {
        sx_gj = 0;
      }
      _this.setData({
        sx_gj: sx_gj
      })
      wx.setStorageSync("sx_gj", sx_gj)
    },
    z_shaixuan6_3() {
      let _this = this;
      let sx_tc = _this.data.sx_tc;
      if (sx_tc == 0) {
        sx_tc = 1;
      } else {
        sx_tc = 0;
      }
      _this.setData({
        sx_tc: sx_tc
      })
      wx.setStorageSync("sx_tc", sx_tc)
    },
    z_shaixuan6_4() {
      let _this = this;
      let sx_sc = _this.data.sx_sc;
      if (sx_sc == 0) {
        sx_sc = 1;
      } else {
        sx_sc = 0;
      }
      _this.setData({
        sx_sc: sx_sc
      })
      wx.setStorageSync("sx_sc", sx_sc)
    },
    z_shaixuan6_5() {
      let _this = this;
      let sx_tply = _this.data.sx_tply;
      if (sx_tply == 0) {
        sx_tply = 1;
      } else {
        sx_tply = 0;
      }
      _this.setData({
        sx_tply: sx_tply
      })
      wx.setStorageSync("sx_sc", sx_tply)
    },
    z_sxkaishi() {
      if (wx.getStorageSync("user_token") == "") {
        this.z_dengluyanzeng()
      } else {
        this.setData({
          saixuan: true
        })
      }
    },
    z_sxquxiao() {
      this.setData({
        saixuan: false
      })
    },
    z_sxqingling() {
      let _this = this
      const date = new Date();
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');
      var currentDate = `${year}-${month}-${day}`;
      if (wx.getStorageSync("currentDate") != currentDate) {
        _this.z_sxchongzhi()
        wx.setStorageSync("currentDate", currentDate)
      }
    },
    z_sxchongzhi() {
      let _this = this
      let sxlist4 = _this.data.sxlist4
      for (let i = 0; i < sxlist4.length; i++) {
        sxlist4[i].xz_flag = false
      }
      let sxlist5 = _this.data.sxlist5
      for (let i = 0; i < sxlist5.length; i++) {
        sxlist5[i].xz_flag = false
      }
      _this.setData({
        is_sp: "0",
        order_type: 0,
        sx_sex: '',
        sx_area: 0,
        sxlist4: sxlist4,
        sxlist5: sxlist5,
        sx_fenlu: [],
        sx_yxdj: [],
        sx_zx: 0,
        sx_gj: 0,
        sx_tc: 0,
        sx_sc: 0,
        saixuan1: false,
        supei: false,
        is_clear: 1
      })
      this.z_sxchongzhi1()
    },
    z_sxchongzhi1() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/home/spSearchClear',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_jilu()
        }
      })
    },
    z_sxwancheng() {
      let _this = this
      let is_sp
      if (_this.data.order_type != 0 || _this.data.order_type1 != 0 || _this.data.sx_sex != 0 || _this.data.sx_area != 0 || _this.data.sx_fenlu1 || _this.data.sx_yxdj1 || _this.data.sx_zx != 0 || _this.data.sx_gj != 0 || _this.data.sx_tc != 0 || _this.data.sx_sc != 0 || _this.data.sx_tply != 0) {
        is_sp = 1
      } else {
        is_sp = 0
      }
      _this.setData({
        is_sp: is_sp,
        saixuan: false
      })
      setTimeout(function () {
        _this.z_sxchongzhi3()
      }, 500)
      _this.z_jilu()
    },
    onShow() {
      this.gaodu()
      this.z_yonghu()
      this.z_yonghu1()
      //  this.z_bisai()
      this.z_idxtc()
      this.z_guanjun()
      this.z_jilu1()
      this.z_jilu3()
      this.z_jilu4()
      this.guanggao1()
      this.z_meiri()
      this.z_zhanghao()
      this.z_jiangpin()
      this.z_peizhi()
      this.gameduanwei()
      this.z_kefu()
      // this.z_sxqingling()
      this.z_idxgg()
      this.z_sxchongzhi2()
    },
    z_sxchongzhi2() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/home/spSearchTj',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          let order_type = res.data.data.order_type;
          let sx_sex;
          if (res.data.data.sx_sex == '男') {
            sx_sex = 1
          } else if (res.data.data.sx_sex == '女') {
            sx_sex = 2
          } else {
            sx_sex = 0
          }
          let sx_area = res.data.data.sx_area;
          let sxlist4 = _this.data.sxlist4;
          let sx_fenlu0 = res.data.data.sx_fenlu_arr[0];
          if (sx_fenlu0 != undefined && sx_fenlu0 != '0') {
            for (let i0 = 0; i0 < sxlist4.length; i0++) {
              if (sx_fenlu0 == sxlist4[i0].id) {
                sxlist4[i0].xz_flag = true
              }
            }
          }
          let sx_fenlu1 = res.data.data.sx_fenlu_arr[1];
          if (sx_fenlu1 != undefined && sx_fenlu1 != '0') {
            for (let i1 = 0; i1 < sxlist4.length; i1++) {
              if (sx_fenlu1 == sxlist4[i1].id) {
                sxlist4[i1].xz_flag = true
              }
            }
          }
          let sx_fenlu2 = res.data.data.sx_fenlu_arr[2];
          if (sx_fenlu2 != undefined && sx_fenlu2 != '0') {
            for (let i2 = 0; i2 < sxlist4.length; i2++) {
              if (sx_fenlu2 == sxlist4[i2].id) {
                sxlist4[i2].xz_flag = true
              }
            }
          }
          let sx_fenlu3 = res.data.data.sx_fenlu_arr[3];
          if (sx_fenlu3 != undefined && sx_fenlu3 != '0') {
            for (let i3 = 0; i3 < sxlist4.length; i3++) {
              if (sx_fenlu3 == sxlist4[i3].id) {
                sxlist4[i3].xz_flag = true
              }
            }
          }
          let sx_fenlu4 = res.data.data.sx_fenlu_arr[4];
          if (sx_fenlu4 != undefined && sx_fenlu4 != '0') {
            for (let i4 = 0; i4 < sxlist4.length; i4++) {
              if (sx_fenlu4 == sxlist4[i4].id) {
                sxlist4[i4].xz_flag = true
              }
            }
          }
          let sx_fenlu5 = res.data.data.sx_fenlu_arr[5];
          if (sx_fenlu5 != undefined && sx_fenlu5 != '0') {
            for (let i5 = 0; i5 < sxlist4.length; i5++) {
              if (sx_fenlu5 == sxlist4[i5].id) {
                sxlist4[i5].xz_flag = true
              }
            }
          }
          let sxlist5 = _this.data.sxlist5;
          let sx_yxdj0 = res.data.data.sx_yxdj_arr[0];
          if (sx_yxdj0 != undefined && sx_yxdj0 != '0') {
            for (let j0 = 0; j0 < sxlist5.length; j0++) {
              if (sx_yxdj0 == sxlist5[j0].id) {
                sxlist5[j0].xz_flag = true
              }
            }
          }
          let sx_yxdj1 = res.data.data.sx_yxdj_arr[1];
          if (sx_yxdj1 != undefined && sx_yxdj1 != '0') {
            for (let j1 = 0; j1 < sxlist5.length; j1++) {
              if (sx_yxdj1 == sxlist5[j1].id) {
                sxlist5[j1].xz_flag = true
              }
            }
          }
          let sx_yxdj2 = res.data.data.sx_yxdj_arr[2];
          if (sx_yxdj2 != undefined && sx_yxdj2 != '0') {
            for (let j2 = 0; j2 < sxlist5.length; j2++) {
              if (sx_yxdj2 == sxlist5[j2].id) {
                sxlist5[j2].xz_flag = true
              }
            }
          }
          let sx_yxdj3 = res.data.data.sx_yxdj_arr[3];
          if (sx_yxdj3 != undefined && sx_yxdj3 != '0') {
            for (let j3 = 0; j3 < sxlist5.length; j3++) {
              if (sx_yxdj3 == sxlist5[j3].id) {
                sxlist5[j3].xz_flag = true
              }
            }
          }
          let sx_yxdj4 = res.data.data.sx_yxdj_arr[4];
          if (sx_yxdj4 != undefined && sx_yxdj4 != '0') {
            for (let j4 = 0; j4 < sxlist5.length; j4++) {
              if (sx_yxdj4 == sxlist5[j4].id) {
                sxlist5[j4].xz_flag = true
              }
            }
          }
          let sx_yxdj5 = res.data.data.sx_yxdj_arr[5];
          if (sx_yxdj5 != undefined && sx_yxdj5 != '0') {
            for (let j5 = 0; j5 < sxlist5.length; j5++) {
              if (sx_yxdj5 == sxlist5[j5].id) {
                sxlist5[j5].xz_flag = true
              }
            }
          }
          let sx_yxdj6 = res.data.data.sx_yxdj_arr[6];
          if (sx_yxdj6 != undefined && sx_yxdj6 != '0') {
            for (let j6 = 0; j6 < sxlist5.length; j6++) {
              if (sx_yxdj6 == sxlist5[j6].id) {
                sxlist5[j6].xz_flag = true
              }
            }
          }
          let sx_yxdj7 = res.data.data.sx_yxdj_arr[7];
          if (sx_yxdj7 != undefined && sx_yxdj7 != '0') {
            for (let j7 = 0; j0 < sxlist5.length; j7++) {
              if (sx_yxdj7 == sxlist5[j7].id) {
                sxlist5[j7].xz_flag = true
              }
            }
          }
          let sx_zx = res.data.data.sx_zx;
          let sx_gj = res.data.data.sx_gj;
          let sx_tc = res.data.data.sx_tc;
          let sx_sc = res.data.data.sx_sc;
          let supei;
          if (res.data.data.is_search == '1') {
            supei = true
          } else {
            supei = false
          }
          let sx_yxdj_arr = [];
          for (let yxdj = 0; yxdj < res.data.data.sx_yxdj_arr.length; yxdj++) {
            if (res.data.data.sx_yxdj_arr[yxdj] != '0') {
              sx_yxdj_arr.push(res.data.data.sx_yxdj_arr[yxdj])
            }
          }
          let sx_fenlu_arr = [];
          for (let fenlu = 0; fenlu < res.data.data.sx_fenlu_arr.length; fenlu++) {
            if (res.data.data.sx_fenlu_arr[fenlu] != '0') {
              sx_fenlu_arr.push(res.data.data.sx_fenlu_arr[fenlu])
            }
          }
          _this.setData({
            order_type: order_type,
            sx_sex: sx_sex,
            sx_area: sx_area,
            sxlist4: sxlist4,
            sxlist5: sxlist5,
            sx_zx: sx_zx,
            sx_gj: sx_gj,
            sx_tc: sx_tc,
            sx_sc: sx_sc,
            sx_yxdj: sx_yxdj_arr,
            sx_fenlu: sx_fenlu_arr,
            supei: supei
          })
          _this.z_jilu()
        }
      })
    },
    z_sxchongzhi3() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/home/spSearchTj',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          let order_type = res.data.data.order_type;
          let sx_sex;
          if (res.data.data.sx_sex == '男') {
            sx_sex = 1
          } else if (res.data.data.sx_sex == '女') {
            sx_sex = 2
          } else {
            sx_sex = 0
          }
          let sx_area = res.data.data.sx_area;
          let sxlist4 = _this.data.sxlist4;
          let sx_fenlu0 = res.data.data.sx_fenlu_arr[0];
          if (sx_fenlu0 != undefined && sx_fenlu0 != '0') {
            for (let i0 = 0; i0 < sxlist4.length; i0++) {
              if (sx_fenlu0 == sxlist4[i0].id) {
                sxlist4[i0].xz_flag = true
              }
            }
          }
          let sx_fenlu1 = res.data.data.sx_fenlu_arr[1];
          if (sx_fenlu1 != undefined && sx_fenlu1 != '0') {
            for (let i1 = 0; i1 < sxlist4.length; i1++) {
              if (sx_fenlu1 == sxlist4[i1].id) {
                sxlist4[i1].xz_flag = true
              }
            }
          }
          let sx_fenlu2 = res.data.data.sx_fenlu_arr[2];
          if (sx_fenlu2 != undefined && sx_fenlu2 != '0') {
            for (let i2 = 0; i2 < sxlist4.length; i2++) {
              if (sx_fenlu2 == sxlist4[i2].id) {
                sxlist4[i2].xz_flag = true
              }
            }
          }
          let sx_fenlu3 = res.data.data.sx_fenlu_arr[3];
          if (sx_fenlu3 != undefined && sx_fenlu3 != '0') {
            for (let i3 = 0; i3 < sxlist4.length; i3++) {
              if (sx_fenlu3 == sxlist4[i3].id) {
                sxlist4[i3].xz_flag = true
              }
            }
          }
          let sx_fenlu4 = res.data.data.sx_fenlu_arr[4];
          if (sx_fenlu4 != undefined && sx_fenlu4 != '0') {
            for (let i4 = 0; i4 < sxlist4.length; i4++) {
              if (sx_fenlu4 == sxlist4[i4].id) {
                sxlist4[i4].xz_flag = true
              }
            }
          }
          let sx_fenlu5 = res.data.data.sx_fenlu_arr[5];
          if (sx_fenlu5 != undefined && sx_fenlu5 != '0') {
            for (let i5 = 0; i5 < sxlist4.length; i5++) {
              if (sx_fenlu5 == sxlist4[i5].id) {
                sxlist4[i5].xz_flag = true
              }
            }
          }
          let sxlist5 = _this.data.sxlist5;
          let sx_yxdj0 = res.data.data.sx_yxdj_arr[0];
          if (sx_yxdj0 != undefined && sx_yxdj0 != '0') {
            for (let j0 = 0; j0 < sxlist5.length; j0++) {
              if (sx_yxdj0 == sxlist5[j0].id) {
                sxlist5[j0].xz_flag = true
              }
            }
          }
          let sx_yxdj1 = res.data.data.sx_yxdj_arr[1];
          if (sx_yxdj1 != undefined && sx_yxdj1 != '0') {
            for (let j1 = 0; j1 < sxlist5.length; j1++) {
              if (sx_yxdj1 == sxlist5[j1].id) {
                sxlist5[j1].xz_flag = true
              }
            }
          }
          let sx_yxdj2 = res.data.data.sx_yxdj_arr[2];
          if (sx_yxdj2 != undefined && sx_yxdj2 != '0') {
            for (let j2 = 0; j2 < sxlist5.length; j2++) {
              if (sx_yxdj2 == sxlist5[j2].id) {
                sxlist5[j2].xz_flag = true
              }
            }
          }
          let sx_yxdj3 = res.data.data.sx_yxdj_arr[3];
          if (sx_yxdj3 != undefined && sx_yxdj3 != '0') {
            for (let j3 = 0; j3 < sxlist5.length; j3++) {
              if (sx_yxdj3 == sxlist5[j3].id) {
                sxlist5[j3].xz_flag = true
              }
            }
          }
          let sx_yxdj4 = res.data.data.sx_yxdj_arr[4];
          if (sx_yxdj4 != undefined && sx_yxdj4 != '0') {
            for (let j4 = 0; j4 < sxlist5.length; j4++) {
              if (sx_yxdj4 == sxlist5[j4].id) {
                sxlist5[j4].xz_flag = true
              }
            }
          }
          let sx_yxdj5 = res.data.data.sx_yxdj_arr[5];
          if (sx_yxdj5 != undefined && sx_yxdj5 != '0') {
            for (let j5 = 0; j5 < sxlist5.length; j5++) {
              if (sx_yxdj5 == sxlist5[j5].id) {
                sxlist5[j5].xz_flag = true
              }
            }
          }
          let sx_yxdj6 = res.data.data.sx_yxdj_arr[6];
          if (sx_yxdj6 != undefined && sx_yxdj6 != '0') {
            for (let j6 = 0; j6 < sxlist5.length; j6++) {
              if (sx_yxdj6 == sxlist5[j6].id) {
                sxlist5[j6].xz_flag = true
              }
            }
          }
          let sx_yxdj7 = res.data.data.sx_yxdj_arr[7];
          if (sx_yxdj7 != undefined && sx_yxdj7 != '0') {
            for (let j7 = 0; j0 < sxlist5.length; j7++) {
              if (sx_yxdj7 == sxlist5[j7].id) {
                sxlist5[j7].xz_flag = true
              }
            }
          }
          let sx_zx = res.data.data.sx_zx;
          let sx_gj = res.data.data.sx_gj;
          let sx_tc = res.data.data.sx_tc;
          let sx_sc = res.data.data.sx_sc;
          let supei;
          if (res.data.data.is_search == '1') {
            supei = true
          } else {
            supei = false
          }
          let sx_yxdj_arr = [];
          for (let yxdj = 0; yxdj < res.data.data.sx_yxdj_arr.length; yxdj++) {
            if (res.data.data.sx_yxdj_arr[yxdj] != '0') {
              sx_yxdj_arr.push(res.data.data.sx_yxdj_arr[yxdj])
            }
          }
          let sx_fenlu_arr = [];
          for (let fenlu = 0; fenlu < res.data.data.sx_fenlu_arr.length; fenlu++) {
            if (res.data.data.sx_fenlu_arr[fenlu] != '0') {
              sx_fenlu_arr.push(res.data.data.sx_fenlu_arr[fenlu])
            }
          }
          if(sx_fenlu_arr == ''){
            sx_fenlu_arr.push(0)
          }
          if(sx_yxdj_arr == ''){
            sx_yxdj_arr.push(0)
          }
          _this.setData({
            order_type: order_type,
            sx_sex: sx_sex,
            sx_area: sx_area,
            sxlist4: sxlist4,
            sxlist5: sxlist5,
            sx_zx: sx_zx,
            sx_gj: sx_gj,
            sx_tc: sx_tc,
            sx_sc: sx_sc,
            sx_yxdj: sx_yxdj_arr,
            sx_fenlu: sx_fenlu_arr,
            supei: supei
          })
        }
      })
    },
    z_kefu() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/wztzs/tzsList',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            kefu: res.data.data
          })
        }
      })
    },
    gameduanwei() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/config/gameDw?game_type_id=1',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          let sxlist5 = res.data.data;
          sxlist5.forEach(item => {
            item.xz_flag = false;
          })
          const newData = {
            id: 0,
            name: '不限',
            xz_flag: false
          };
          sxlist5.unshift(newData);
          _this.setData({
            sxlist5: sxlist5
          })
        }
      })
    },
    z_guanjun() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/duobao/gjsTanStatus',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          if (res.data.data.tan_status == '1') {
            _this.setData({
              idxttc1: true
            })
          }
        }
      })
    },
    z_peizhi() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/config/configBase',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            peizhi: res.data.data
          })
        }
      })
    },
    z_jiangpin() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "page_no": '1', //第几页
        "page_num": "2", //每页显示数量
        "jpdl": '0', //奖品大类id
        "name": '', //奖品名称
        "order_type": '0', //排序  0 不限制   1-兑换数量降序   2-兑换钻石升序
      }
      wx.request({
        url: app.apiurl + 'api/duobao/duobaoPrizeList',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            jplist: res.data.data.list,
          })
        }
      })
    },
    z_zhanghao() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/test/tempData',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          console.log('账号：', res.data.data)
        }
      })
    },
    z_meiri() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/member/todayBm',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            list111: res.data.data
          })
        }
      })
    },
    z_bisai() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/member/luckInfo',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            bisai: res.data.data
          })
        }
      })
    },
    z_jilu() {
      let _this = this
      let sx_sex = _this.data.sx_sex;
      if (sx_sex == 1) {
        sx_sex = '男'
      } else if (sx_sex == 2) {
        sx_sex = '女'
      } else {
        sx_sex = ''
      }
      let order_type = _this.data.order_type;
      let sx_area = _this.data.sx_area;
      let sx_fenlu = _this.data.sx_fenlu;
      let sx_yxdj = _this.data.sx_yxdj;
      let sx_zx = _this.data.sx_zx;
      let sx_gj = _this.data.sx_gj;
      let sx_tc = _this.data.sx_tc;
      let sx_sc = _this.data.sx_sc;
      let sx_tply = _this.data.sx_tply;
      let order_type1 = _this.data.order_type1;
      if(order_type1 == '7'){
        order_type1 = '8'
      } else if(order_type1 == '8'){
        order_type1 = '9'
      } else if(order_type1 == '9'){
        order_type1 = '7'
      }
      let params = {
        "token": wx.getStorageSync("user_token"),
        "page_no": '1',
        "page_num": "500",
        "is_sp": _this.data.is_sp,
        "order_type": order_type,
        "sx_sex": sx_sex,
        "sx_area": sx_area,
        "sx_fenlu": sx_fenlu.join(),
        "sx_yxdj": sx_yxdj.join(),
        "sx_zx": sx_zx,
        "sx_gj": sx_gj,
        "sx_tc": sx_tc,
        "sx_sc": sx_sc,
        "is_clear": _this.data.is_clear,
        "sx_lylx":order_type1,
        "sx_tply":sx_tply
      }
      wx.request({
        url: app.apiurl + 'api/home/memberShowList',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          if (_this.data.is_sp == '1' && res.data.code == '1001') {
            wx.showToast({
              title: '速配成功奖励' + _this.data.peizhi.config_param24 + '夺宝券',
              icon: 'none',
              duration: 2000
            })
            _this.setData({
              is_sp: 0
            })
          }
          if (res.data.code == '1002') {
            wx.showToast({
              title: '金币不足请充值',
              icon: 'none',
              duration: 2000
            })
          }
          let list3 = res.data.data.list
          _this.setData({
            list3: list3
          })
          _this.z_yonghu()
          _this.z_peizhi()
        }
      })
    },
    z_idxgg() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/home/index',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            login: true,
            idx_gg: res.data.data,
            xydb_pm_status: res.data.data.xydb_pm_status,
            bm_wztzs_status: res.data.data.bm_wztzs_status,
            day_sign_status:res.data.data.day_sign_status,
            xydb_pm: res.data.data.xydb_pm
            // time1:res.data.data.activity_info.diff_time
          })
          // _this.z_time()
          if (res.data.data.kh_info != '') {
            _this.setData({
              kh_info: true
            })
          }
          if (res.data.data.tj_activity != '') {
            _this.setData({
              tj_activity: true
            })
          }
          setTimeout(function () {
            _this.z_bsInfoData()
          }, 500)
        }
      })
    },
    z_bsInfoData() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/home/bsInfoData',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            xydb_pm_status: res.data.data.xydb_pm_status,
            bm_wztzs_status: res.data.data.bm_wztzs_status,
            xydb_pm: res.data.data.xydb_pm
          })
        }
      })
    },
    guanggao1() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/config/advertPage',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          console.log(res.data.data)
          _this.guanggao2()
          _this.guanggao3()
          _this.guanggao4()
        }
      })
    },
    // guanggao2() {
    //   let _this = this
    //   let params = {
    //     "token": wx.getStorageSync("user_token"),
    //   }
    //   wx.request({
    //     url: app.apiurl + 'api/danye/info?id=4',
    //     method: 'GET',
    //     data: params,
    //     header: {
    //       'content-type': 'application/x-www-form-urlencoded' // 修改请求
    //     },
    //     success(res) {
    //       _this.setData({
    //         gglist: res.data.data
    //       })
    //     }
    //   })
    // },
    guanggao2() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/config/advert?page_id=17',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            gglist: res.data.data[0]
          })
        }
      })
    },
    z_kvlianjia(e) {
      let _this = this
      let link_url = e.currentTarget.dataset.url
      let id = e.currentTarget.dataset.url
      if (link_url != undefined) {
        wx.navigateTo({
          url: link_url,
        })
      }
    },
    z_kvlianjia1(e) {
      let _this = this
      let link_url = e.currentTarget.dataset.url
      let id = e.currentTarget.dataset.url
      if (link_url != undefined) {
        wx.navigateTo({
          url: link_url,
        })
      }
    },
    guanggao3() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/config/advert?page_id=21',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            gglist1: res.data.data[0]
          })
        }
      })
    },
    guanggao4() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/config/advert?page_id=1',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            gglist2: res.data.data[0]
          })
        }
      })
    },
    z_time() {
      let _this = this
      let sjc = _this.data.time1
      _this.setData({
        time2: timestampToTime(sjc, 3)
      })
    },
    z_yonghu() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/member/myInfo',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          if (res.data.code == '1001') {
            let tmp_khgjs_pm = '0';
            if (res.data.data.khgjs_pm > 10) {
              tmp_khgjs_pm = '10+'
            } else {
              tmp_khgjs_pm = res.data.data.khgjs_pm
            }
            _this.setData({
              login: true,
              yonghu: res.data.data,
              khgjs_pm_index: tmp_khgjs_pm
            })
          }
        }
      })
    },
    z_yonghu1() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
      }
      wx.request({
        url: app.apiurl + 'api/member/myInfo',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          if (res.data.code == '1001') {
            if(res.data.data.sex == ''){
              wx.navigateTo({
                url: '/packageB/pages/shezhi/shezhi',
              })
          } else {
            if(res.data.data.five_yindao == '2'){
              wx.navigateTo({
                url: '/pages/yaoqing/yaoqing',
              })
            } else if(res.data.data.five_yindao == '4'){
              wx.navigateTo({
                url: '/packageB/pages/meiri/meiri',
              })
            } else if(res.data.data.five_yindao == '6'){
              wx.navigateTo({
                url: '/pages/choujiang1/choujiang1',
              })
            } 
          }
          }
        }
      })
    },
    z_idxtc() {
      let _this = this
      if (wx.getStorageSync("index_tanchuang") != new Date().getDate()) {
        setTimeout(function () {
          if (_this.data.yonghu.member_level >= 4) {
            _this.setData({
              idxttc: true
            })
          }
        }, 1000)
      }
    },
    z_jilu1() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token")
      }
      wx.request({
        url: app.apiurl + 'api/member/newUserGuide',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          console.log(res.data.data)
          _this.setData({
            list4: res.data.data
          })
          if (res.data.code == '1001') {
            if (res.data.data[0].show_status == '1') {
              _this.setData({
                yindao: false
              })
              if (wx.getStorageSync("yin_dao") == "false") {
                _this.setData({
                  yindaonum: true
                })
              }
            } else {
              _this.setData({
                yindao: true
              })
            }
          }
        }
      })
    },
    z_jilu3() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token")
      }
      wx.request({
        url: app.apiurl + 'api/member_tj/getTjActivityListNew?name=&page_no=1&page_num=2',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            list5: res.data.data
          })
        }
      })
    },
    z_jilu4() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token")
      }
      wx.request({
        url: app.apiurl + 'api/member_tj/tjBmStatus',
        method: 'GET',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.setData({
            bm_status: res.data.data.bm_status
          })
        }
      })
    },
    gaodu() {
      let res = wx.getSystemInfoSync();
      let statusHeight = res.statusBarHeight;
      this.setData({
        statusHeight: statusHeight
      })
    },
    close() {
      this.setData({
        luodi: false,
        tanchuang14: false,
        tanchuang24: false,
        yindao: false
      })
    },
    close1() {
      this.setData({
        idxttc: false
      })
      wx.setStorageSync("index_tanchuang", new Date().getDate())
    },
    close4() {
      this.setData({
        idxttc: false
      })
      wx.setStorageSync("index_tanchuang", new Date().getDate())
      wx.navigateTo({
        url: '/packageB/pages/kaihei/kaihei',
      })
    },
    close2() {
      this.setData({
        yindaonum: false
      })
      wx.setStorageSync("yin_dao", 'true')
    },
    close3() {
      this.setData({
        yindao: false,
        baoming77: true
      })
      // let childobj = this.selectComponent('.my-component')
      // childobj.setData({
      //   baoming7: true
      // })
    },
    tiaozhuan() {
      wx.navigateTo({
        url: '/packageA/pages/choujiang5/choujiang5',
      })
      wx.setStorageSync("yin_dao", 'false')
    },
    z_yindao() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "yd_status": '7'
      }
      wx.request({
        url: app.apiurl + 'api/member/upMyYd',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_yonghu()
        }
      })
    },
    z_wancheng2() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "up_field": 'hdbm_status'
      }
      wx.request({
        url: app.apiurl + 'api/member/upNewUserGuide',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_jilu1()
          _this.setData({
            yindao: true,
            baoming77: false
          })
        }
      })
    },
    z_wancheng3() {
      let _this = this
      wx.navigateTo({
        url: '/pages/choujiang1/choujiang1',
      })
      // let params = {
      //   "token": wx.getStorageSync("user_token"),
      //   "up_field": 'duobao_status'
      // }
      // wx.request({
      //   url: app.apiurl + 'api/member/upNewUserGuide',
      //   method: 'POST',
      //   data: params,
      //   header: {
      //     'content-type': 'application/x-www-form-urlencoded' // 修改请求
      //   },
      //   success(res) {
      //     wx.navigateTo({
      //       url: '/pages/choujiang1/choujiang1',
      //     })
      //   }
      // })
    },
    z_wancheng4() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "up_field": 'khgjs_status'
      }
      wx.request({
        url: app.apiurl + 'api/member/upNewUserGuide',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          wx.navigateTo({
            url: '/packageB/pages/kaihei/kaihei',
          })
        }
      })
    },
    z_wancheng5() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "up_field": 'tjhy_status'
      }
      wx.request({
        url: app.apiurl + 'api/member/upNewUserGuide',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.tiaozhuan()
        }
      })
    },
    z_wancheng6() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "up_field": 'khgjs_status'
      }
      wx.request({
        url: app.apiurl + 'api/member/upNewUserGuide',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          wx.navigateTo({
            url: '/packageB/pages/kaihei/kaihei',
          })
        }
      })
    },
    z_haoping(e) {
      let _this = this
      _this.setData({
        member_name: e.currentTarget.dataset.name,
        member_id: e.currentTarget.dataset.id,
        tanchuang3: true
      })
    },
    z_haoping1() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "other_member_id": _this.data.member_id
      }
      wx.request({
        url: app.apiurl + 'api/member_kh/haoping',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_close()
          _this.gaodu()
          _this.z_yonghu()
          _this.z_idxgg()
          _this.z_jilu()
          _this.z_idxtc()
          _this.z_jilu1()
          _this.z_jilu3()
          _this.z_jilu4()
          _this.guanggao1()
          _this.z_meiri()
          _this.z_zhanghao()
          _this.z_jiangpin()
          _this.z_peizhi()
        }
      })
    },
    z_xinrenyindao1() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "five_yindao":'1'
      }
      wx.request({
        url: app.apiurl + 'api/member/upMyYd2',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_yonghu()
        }
      })
    },
    z_xinrenyindao2() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "five_yindao":'2'
      }
      wx.request({
        url: app.apiurl + 'api/member/upMyYd2',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_yonghu()
          wx.navigateTo({
            url: '/pages/yaoqing/yaoqing',
          })
        }
      })
    },
    z_xinrenyindao4() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "five_yindao":'4'
      }
      wx.request({
        url: app.apiurl + 'api/member/upMyYd2',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_yonghu()
          wx.navigateTo({
            url: '/packageB/pages/meiri/meiri',
          })
        }
      })
    },
    z_xinrenyindao6() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "five_yindao":'6'
      }
      wx.request({
        url: app.apiurl + 'api/member/upMyYd2',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_yonghu()
          wx.navigateTo({
            url: '/pages/choujiang1/choujiang1',
          })
        }
      })
    },
    z_xinrenyindao8() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "five_yindao":'8'
      }
      wx.request({
        url: app.apiurl + 'api/member/upMyYd2',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_yonghu()
          wx.navigateTo({
            url: '/packageB/pages/wangzhe/wangzhe',
          })
        }
      })
    },
    z_xinrenyindao9() {
      let _this = this
      let params = {
        "token": wx.getStorageSync("user_token"),
        "five_yindao":'9'
      }
      wx.request({
        url: app.apiurl + 'api/member/upMyYd2',
        method: 'POST',
        data: params,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 修改请求
        },
        success(res) {
          _this.z_yonghu()
        }
      })
    },
    previewImage(e) {
      const urls = e.currentTarget.dataset.urls;
      const current = e.currentTarget.dataset.current;
      wx.previewImage({
        current, // 当前显示图片
        urls     // 所有图片列表
      });
    },
    onReachBottom: function () {
      //下滑刷新
      let _this = this
      let page_no = _this.data.page_no
      page_no = page_no + 1
      _this.setData({
        page_no: page_no,
      })
      // _this.z_jilu()
    },
  },
    /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})